<!-- application/layouts/scripts/layout.phtml -->
<?php echo $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>BDE MIAGE Sorbonne</title>
        <!-- Ajouter les include javascript et css ici -->
        <?php echo $this->headLink() ?>
        <?php echo $this->headScript() ?>
        <?php echo $this->headMeta() ?>
        <script type="text/javascript">
            $(document).ready(function() {
                $('a.fancybox').fancybox({
                    'type':'iframe',
                    'width': 400,
                    'enableEscapeButton':true,
                    'overlayShow':true,
                    'openEffect' : 'elastic',
                    'closeEffect': 'elastic',
                    'afterClose'  : function() {
                        window.location.reload();
                    }
                    // 'onClosed': function(){ parent.location.reload(true); }
                });
                // lors du click sur le bouton submit du formulaire
                $('#formLogin').submit(function() {
                    // on ferme la fancybox
                    $("#formLogin").validate();
                    parent.$.fancybox.close();
                });
            });
        </script>
    </head>
    <body>

        <div id="header" style="background-color: #EEEEEE; height: 30px;">
            <div id="header-logo" style="float: left">
                <b>BDE MIAGE Sorbonne</b>
                <?php echo $this->ProfileLink(); ?>
            </div>

            <div id="banniere">
<!--                <img src="/appliweb/public/images/banniere.png"/>-->
            </div> 
        </div>

        <div id ="search">
            <input id="key" name="key" type="text"/>
            <a id="searchLink" onclick='setSearch()' class="search" href="
            <?php echo $this->url(array('module' => 'default', 'controller' => 'Index', 'action' => 'search', 'key' => '')) ?> 
               ">
            </a>
        </div>
        <div class="followus">
            <a class="facebook" href="http://www.facebook.com/pages/Le-Journal-du-Geek/255370230787">Facebook</a>
            <a class="twitter" href="http://twitter.com/journaldugeek">Twitter</a>
        </div> 
        <div>
            <?php echo $this->navigation()->breadcrumbs()->setMinDepth(0)->setLinkLast(true)->setSeparator(" >> "); ?>
        </div>
        <div id="content">
            <?php echo $this->navigation()->menu(); ?>

            <?php echo $this->layout()->content ?>
            <div class="fb-like" data-href="http://www.facebook.com/251121821659117" data-send="false" data-layout="button_count" data-width="450" data-show-faces="true"></div>
        </div>

        <div id ="footer">
            <a href="https://twitter.com/BDEMiageSorbonn" class="twitter-follow-button" data-show-count="false" data-lang="fr">Suivre @BDEMiageSorbonn</a>
            <div id="fb-root"></div>
            <div id="newsletter">
                Inscrivez à la Newsletter : <input id="mail" name="mail" type="text"/>
            </div>
        </div>
        <script type="text/javascript">
            function setSearch(){
                var key =  document.getElementById('key').value;
                var link = document.getElementById('searchLink');
                var href = link.getAttribute('href');
                href = href.replace(/ /g,"").replace(/\n/g,"") + key;
                link.setAttribute('href', href);
            }
            $('.search').button({
                icons: {
                    primary: "ui-icon-search"
                },
                text: false
            });
                !function(d,s,id){
                var js,fjs=d.getElementsByTagName(s)[0];
                if(!d.getElementById(id)){
                    js=d.createElement(s);
                    js.id=id;js.src="//platform.twitter.com/widgets.js";
                    fjs.parentNode.insertBefore(js,fjs);
                }
            }(document,"script","twitter-wjs");
            (function(d, s, id) {

                var js, fjs = d.getElementsByTagName(s)[0];

                if (d.getElementById(id)) return;

                js = d.createElement(s); js.id = id;

                js.src = "//connect.facebook.net/fr_FR/all.js#xfbml=1";

                fjs.parentNode.insertBefore(js, fjs);

            }(document, 'script', 'facebook-jssdk'));
        </script>
    </body>
</html>